Macros may be defined using parameters as well. In this case the text passed as an "argument" is placed into the replacement text everywhere the parameter appears:
# define SQUARE(x) x * x /* don't use this version! */
.
.
f_array[i] = SQUARE(f_array[i]);
After preprocessing, the "call" to the SQUARE() macro expands to:
f_array[i] = f_array[i] * f_array[i];
However, there is a serious deficiency with the SQUARE() macro defined above. An expression like 'c = 1./SQUARE(a + b)' expands to 'c = 1./a + b * a + b'. Due to the arithmetic precedence rules, this does not produce the desired result. The preprocessor performs text substitution without regard for rules of C syntax. The